<template>
  <a-modal
    :title="title"
    :width="modalWidth"
    :visible="visible"
    :confirmLoading="confirmLoading"
    @cancel="handleCancel"
    cancelText="关闭"
  >
    <a-spin :spinning="confirmLoading">
      <a-table ref="table" size="middle" :scroll="{ x: true }" bordered rowKey="id" :columns="columns"
        :dataSource="dataSource" :pagination="ipagination" :loading="loading"
        class="j-table-force-nowrap"
        @change="handleTableChange">
      </a-table>
    </a-spin>
    <template slot="footer">
        <a-button @click="handleCancel">关闭</a-button>
    </template>
  </a-modal>
</template>

<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  export default {
    name: "HrDtpShareCompareListModal",
    mixins: [JeecgListMixin, mixinDevice],
    data () {
      return {
        title:"DTP份额对照",
        modalWidth:1000,
        visible: false,
      confirmLoading: false,
         /* 排序参数 */
      isorter: {
        column: 'post_level',
        order: 'desc',
          },
      ipagination: {
        pageSize:10
      },   
      // 表头
      columns: [
        {
          title: 'DTP职级',
          align: "center",
          dataIndex: 'postLevel_dictText'
        },
        {
          title: '岗位DTP份额',
          align: "center",
          dataIndex: 'postShare'
        },
        {
          title: '绩效DTP份额',
          children: [
            {
              title: 'S',
              align: "center",
              dataIndex: 'shareS'
            },
            {
              title: 'A',
              align: "center",
              dataIndex: 'shareA'
            },
            {
              title: 'B',
              align: "center",
              dataIndex: 'shareB'
            },
            {
              title: 'C',
              align: "center",
              dataIndex: 'shareC'
            },
            {
              title: 'D',
              align: "center",
              dataIndex: 'shareD'
            },
          ]
        },
      ],
        url: {
        list: "/hr/hrDtpShareCompare/list",

      },  
      }
    },
    methods: {
    
      handleCancel () {
        this.close()
      },
        close() {
        this.visible =false
      },
    
 

    }
  }
</script>

<style scoped>

</style>

